home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / rayshade / libray / libtext / Makefile.SH < prev    next >
Makefile  |  1994-08-01  |  2KB  |  63 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting libtext/Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. OPTIMIZE = $optimize
  24. CCFLAGS = $ccflags $large
  25. RANLIB = $ranlib
  26. CC = $cc
  27. MKDEP = $mkdep
  28.  
  29. !GROK!THIS!
  30.  
  31. : In the following dollars and backticks do not need the extra backslash.
  32. $spitshell >>Makefile <<'!NO!SUBS!'
  33. LIB = ../libray.a
  34. INCLUDE = -I.. -I../..
  35. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  36. SHELL = /bin/sh
  37.  
  38. CFILES = blotch.c bump.c checker.c cloud.c fbm.c fbmbump.c gloss.c \
  39.      imagetext.c mapping.c marble.c mount.c noise.c sky.c stripe.c \
  40.      textaux.c texture.c windy.c wood.c
  41.  
  42. OFILES = $(CFILES:.c=.o)
  43.  
  44. $(LIB): $(OFILES)
  45.     ar cur $(LIB) $(OFILES)
  46.     $(RANLIB) $(LIB)
  47.  
  48. clean:
  49.     rm -f $(OFILES)
  50.  
  51. depend:
  52.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  53.      $(MKDEP) $(CFILES) | sed 's/: \.\//: /; /\/usr\/include/d' \
  54.     ) >Makefile.new
  55.     cp Makefile Makefile.bak
  56.     cp Makefile.new Makefile
  57.     rm -f Makefile.new
  58.  
  59. # DO NOT DELETE THIS LINE
  60. !NO!SUBS!
  61. chmod 755 Makefile
  62. $eunicefix Makefile
  63.